#ifndef HELIOSTAT_H
#define HELIOSTAT_H

#include <algorithm/shared/utils/Para.h>
#include <algorithm/shared/utils/Vec2.h>
#include <algorithm/shared/utils/Vec3.h>
#include <utils/ParaUtils.h>

#include <boost/describe.hpp>

#include <atomic>
#include <cstdlib>
#include <memory>

namespace solar
{
    class Material;
    class Geometry;
    class MechanicalPara;

    class Heliostat : public Para
    {
        public:
            ~Heliostat() override = default;
            Heliostat() = default;
            Heliostat(Heliostat&& another) noexcept;
            Heliostat(Heliostat& another) = default;
            auto operator=(Heliostat&& another)  noexcept -> Heliostat&;
            auto operator=(const Heliostat& another) -> Heliostat& = default;

#include <utils/class_name.inc>
            static std::atomic_int heliostat_cnt_;

        private:
            std::uint64_t id_; // 当前镜子的id，id无法更改
            // MaterialType material_type_;
            // GeometryType geometry_type_;

            std::shared_ptr<Material> material_;
            std::shared_ptr<Geometry> geometry_;

            Vec2 subhelio_row_col_; // 子定日镜的行列数
            Vec2 gap_;              // 子定日镜之间的间距

            // ！！！！应该还有很多其他要补充的参数
            double thickness_; // 厚度
            bool has_brace_;   // 是否有支架

            // 力学参数
            std::shared_ptr<MechanicalPara> mechanical_para_;

            BOOST_DESCRIBE_CLASS(Heliostat, (Para), (), (),
                                 (id_, material_, geometry_, thickness_, has_brace_,
                                  mechanical_para_, subhelio_row_col_, gap_))
    };

} // namespace solar
#define CURRENT_CLASS_NAME Heliostat
#include <utils/class_describe_header.inc>
SOLAR_DESCRIBE_CLASS(Heliostat, (Para), (), (),
                     (id_, material_, geometry_, thickness_, has_brace_, mechanical_para_,
                      subhelio_row_col_, gap_))
#endif
